<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.caac.core.web.resmgr.bean.*"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<tiles:insert definition="Framework.Resource"  flush="true">
<tiles:put name="modno"  value="1" />
<tiles:put name="title">
<bean:message key="framework.resmgr.search"/>
</tiles:put>

<tiles:put name="content">
<base target="_self">
<form>

<table bgcolor="#CCCCCC" border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" width="748" id="AutoNumber1" align="center">

  <tr bgcolor="#FFFFFF">
      <td colspan="5" height="1"></td>
  </tr>

  <tr bordercolor="#c0c0c0" height="26" bgcolor="#CCCCCC">

    <logic:present name="CallFromTemplateDesign">
    <td height="26">
      <div align="center">&nbsp;</div>
    </td>
    </logic:present>

    <td width="50" height="26">
      <div align="center">
      <bean:message bundle="resMgr" key="ResMgr.fileicon"/>
      </div>
    </td>

    <td width="190" align="center" nowrap height="26">
      <div align="center">
      <bean:message bundle="resMgr" key="ResMgr.filename"/>
      </div>
    </td>

    <td width="190" height="26">
      <div align="center">
      <bean:message bundle="resMgr" key="ResMgr.filedate"/>
      </div>
    </td>

    <td width="170" height="26">
      <div align="center">
      <bean:message bundle="resMgr" key="ResMgr.filesize"/>
      </div>
    </td>
  </tr>

  <logic:iterate id="file" name="files" type="com.fulong.longcon.cms.resmgr.bean.ResFile">
  <tr bordercolor="#c0c0c0" height="26" bgcolor="#FFFFFF">

    <logic:present name="CallFromTemplateDesign">
    <td bordercolor="#C0C0C0">
      <div align="center">
      <input type="checkbox"
             name="selectedFiles"
             text='<html:rewrite page="<%= file.getVirtualPath() %>" />'
             value='<bean:write name="file" property="name"/>'
      />
      </div>
    </td>
    </logic:present>

    <td height="32">
    <div align="center">
        <img src='<html:rewrite page="<%= file.getVirtualPath() %>" />' width="30" height="30"/>
    </div>
    </td>

    <td width="250" bordercolor="#C0C0C0">
      <div align="left">
      &nbsp;
        <a href='<html:rewrite page="<%= file.getVirtualPath() %>" />' >
          <bean:write name="file" property="shortName"/>
        </a>
      </div>
    </td>

    <td width="250">
      <div align="center">
        <bean:write name="file" property="date"/>
      </div>
    </td>

    <td width="200">
      <div align="right">
        <bean:write name="file" property="size"/>&nbsp;
      </div>
    </td>
  </tr>
  </logic:iterate>

  <logic:present name="CallFromTemplateDesign">
  <tr bordercolor="#c0c0c0">
    <td colspan="5" height="26" align="right" bgcolor="f1f1f1">
        <div align="right">
          <button onclick="returnFileUrl('not more than 1 file can be sent to template.')">
            <bean:message bundle="resMgr" key="ResMgr.selectIt"/>
          </button>
          &nbsp;
        </div>
    </td>
  </tr>
  </logic:present>

<tr bgcolor="#FFFFFF">
<td colspan="8">
 <tiles:insert page="/included/pager.jsp" flush="false">
 <tiles:put name="url">/protected/resmgr/showSearchResult.do</tiles:put>
 </tiles:insert>
 </td>
</tr>

</table>

</form>
</tiles:put>
</tiles:insert>
